<!DOCTYPE html>
<!--时间倒计时功能，倒计时10秒后，跳转到百度。页面要动态显示剩余时间-->
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var i = 9;
			function countDown() {
				document.getElementById("show").innerHTML = i;
				i--;
				if(i == -1) {
					window.location.href = "http://www.baidu.com";
					window.clearInterval(now);
				}
			}

			function cd() {
				setInterval("countDown()", 1000);
			}
		</script>
	</head>
	<body>
		<div id="show" style="color: red;">
			<input type="button" value="cd" onclick="cd()" />
		</div>
	</body>
</html>
